/**
 * @file       Point.h
 * @brief      CPoint
 * @author     Huabo Zheng
 * @date       Jan 12, 2012
 * @Copyright  2012, www.netgear.com Inc. All rights reserved.
 */

#ifndef POINT_H_
#define POINT_H_

#include "Object.h"

namespace NS_LCD_AFW
{

/**
 *@class  CPoint
 *@brief  CPoint
 */
class CPoint: public CObject
{
public:

	/**
	 *@brief Constructor
	 *@attention If no arguments are given, x and y members are initialized as (0,0).
	 */
	CPoint();

	/**
	 *@brief Constructor with init params
	 *@param[in] x Specifies the value of the x member of CPoint.
	 *@param[in] y Specifies the value of the y member of CPoint.
	 *@exception none
	 *@retval    none
	 *@return    none
	 *@note      none
	 *@attention If no arguments are given, x and y members are not initialized.
	 *@see
	*/
	CPoint(int x, int y);

	/**
	 *@brief Destructor
	 */
	virtual ~CPoint();

public:

	/**
	 *@brief  Get the value of the x member of CPoint
	 *@details Get the value of the x member of CPoint
	 *@exception none
	 *@retval    int
	 *@return    The value of the x member of CPoint
	 *@note
	 *@attention
	 *@see
	*/
	int getX() const;


	/**
	 *@brief  Get the value of the y member of CPoint
	 *@details Get the value of the y member of CPoint
	 *@exception none
	 *@retval    int
	 *@return    The value of the y member of CPoint
	 *@note
	 *@attention
	 *@see
	*/
	int getY() const;

	/**
	 *@brief  Set the value of the x member of CPoint
	 *@details Set the value of the x member of CPoint
	 *@param[in]  x the new  value of the x member of CPoint
	 *@exception none
	 *@retval    void
	 *@return    none
	 *@note
	 *@attention
	 *@see
	*/
	void setX(int x);

	/**
	 *@brief  Set the value of the y member of CPoint
	 *@details Set the value of the y member of CPoint
	 *@param[in]  y the new  value of the y member of CPoint
	 *@exception none
	 *@retval    void
	 *@return    none
	 *@note
	 *@attention
	 *@see
	*/
	void setY(int y);

	/**
	 *@brief  Checks for equality between two points.
	 *@details Checks for equality between two points.
	 *@param[in]  other Another CPoint object
	 *@exception none
	 *@retval    bool
	 *@return    true if the points are equal; otherwise false.
	 *@note
	 *@attention
	 *@see
	*/
	bool operator==(const CPoint &other) const;

	/**
	 *@brief  Checks for inequality between two points.
	 *@details Checks for inequality between two points.
	 *@param[in]  other Another CPoint object
	 *@exception none
	 *@retval    bool
	 *@return    true if the points are equal; otherwise false.
	 *@note
	 *@attention
	 *@see
	*/
	bool operator!=(const CPoint &other) const;

	/**
	 *@brief  Returns the sum of a CPoint and a size or point.
	 *@details Returns the sum of a CPoint and a size or point.
	 *@param[in]  other Another CPoint object
	 *@exception none
	 *@retval    CPoint &
	 *@return    A CPoint that is offset by a point
	 *@note
	 *@attention
	 *@see
	*/
	CPoint & operator+(const CPoint &other);

private:

	/** the x value of  of CPoint*/
	int m_nX;

	/** the y value of  of CPoint*/
	int m_nY;
};

} /* namespace NS_LCD_AFW */
#endif /* POINT_H_ */
